package com.tbit.uqbike.object.pojo;

import com.tbit.uqbike.constant.AccountConfigExtConstant;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 变更计费规则开关 入参
 *
 * @author <a href="mailto:zhang.zhiliang@tbit.com.cn">Zhang ZhiLiang</a>
 * @version 1.0
 * @see <a href="http://adsl1.tbit.com.cn:21490/pages/viewpage.action?pageId=82182491">订单号规范</a>
 * @since 2025/5/13
 */
@Data
public class ModifyFeeTypeDto {

    /** 区域id */
    private Integer accountId;
    /** 0 普通计费 ， 1 分时计费 ， 2 假日计费 */
    private Integer feeType;
    /** 操作密钥 */
    private String operaPsw;

    public List<AccountConfigExt> getAccountConfigExtParamKey() {
        List<AccountConfigExt> res = new ArrayList<>();
        if (Objects.equals(feeType,0)){
            res.add(new AccountConfigExt(accountId,AccountConfigExtConstant.ACCOUNTCONFIG_TIMEOFUSEBILLING,"0",new Date(),"保存计费规则"));
            res.add(new AccountConfigExt(accountId,AccountConfigExtConstant.HOLIDAY_FEE_SWITCH,"0",new Date(),"保存计费规则"));
        }
        if (Objects.equals(feeType,1)){
            res.add(new AccountConfigExt(accountId,AccountConfigExtConstant.ACCOUNTCONFIG_TIMEOFUSEBILLING,"1",new Date(),"保存计费规则"));
            res.add(new AccountConfigExt(accountId,AccountConfigExtConstant.HOLIDAY_FEE_SWITCH,"0",new Date(),"保存计费规则"));
        }
        if (Objects.equals(feeType,2)){
            res.add(new AccountConfigExt(accountId,AccountConfigExtConstant.ACCOUNTCONFIG_TIMEOFUSEBILLING,"0",new Date(),"保存计费规则"));
            res.add(new AccountConfigExt(accountId,AccountConfigExtConstant.HOLIDAY_FEE_SWITCH,"1",new Date(),"保存计费规则"));
        }
        return res;
    }
}
